package com.hxkj.client.service;

import com.hxkj.domain.po.Channel;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @InterfaceName ChannelServiceClient
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/6/7 11:56
 * @Version 1.0
 */
@FeignClient(name = "cms-article")
public interface ChannelServiceClient {

    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author Mr.zheng
     * @Description saveChannel 新增频道
     * @Date 17:48 2018/6/7
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct saveChannel(@RequestBody Channel channel) throws Exception;

    /**
     * @return com.platform.common.domain.result.ResultPageStruct<com.hxkj.domain.po.Channel>
     * @author Mr.zheng
     * @Description getChannelList 获取频道列表
     * @Date 17:48 2018/6/7
     * @Param [parameterDataStruct]
     **/
    @RequestMapping(value = "/channel/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultPageStruct<Channel> getChannelList(@RequestBody ParameterDataStruct<Channel> parameterDataStruct) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultDataStruct<com.hxkj.domain.po.Channel>
     * @author Mr.zheng
     * @Description getChannel 有条件获取频道
     * @Date 17:49 2018/6/7
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Channel> getChannel(@RequestBody Channel channel) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author Mr.zheng
     * @Description removerChannel 删除频道
     * @Date 17:49 2018/6/7
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct removeChannel(@RequestBody Channel channel) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author Mr.zheng
     * @Description modifyChannel 修改频道
     * @Date 17:53 2018/6/7
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modifyChannel(@RequestBody Channel channel) throws Exception;

    /**
     * @return com.platform.common.domain.result.ResultMessageStruct
     * @author yaosy
     * @Description modifyChannel 修改频道
     * @Date 17:53 2018年7月10日19:27:28
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/getAllChannel", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<List<Channel>> getAllChannel(@RequestBody Channel channel) throws Exception;

    /**
     * 通过站点id获取所有的频道
     * chenfangzhou
     */
    @RequestMapping(value = "/channel/getListBySiteId", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<List<Channel>> getListBySiteId(@RequestBody Channel channel) throws Exception;


    /**
     * @return com.platform.common.domain.result.ResultDataStruct<com.hxkj.domain.po.Channel>
     * @author Mr.zheng
     * @Description getChannelByTempletId 根据站点ID和模板ID获取一条绑定了该模板的频道数据
     * @Date 14:48 2018/8/16
     * @Param [channel]
     **/
    @RequestMapping(value = "/channel/getChannelByTempletId", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Channel> getChannelByTempletId(@RequestBody Channel channel) throws Exception;

}
